package top.wardyan.wdev.dbdevassist.action.user;

import java.util.List;

import org.eclipse.swt.SWT;

import top.wardyan.action.base.AbstractShell;
import top.wardyan.base.model.BaseModel;
import top.wardyan.base.util.DateUtil;
import top.wardyan.control.WTable;
import top.wardyan.control.WTableColumn;
import top.wardyan.control.WTableItem;
import top.wardyan.wdev.dbdevassist.action.base.BaseMasterShell;
import top.wardyan.wdev.dbdevassist.config.DDA;
import top.wardyan.wdev.dbdevassist.model.YTUser;

public class UserShell extends BaseMasterShell<UserShell>{
	
	public UserShell() {
		super();
		this.createContent();
		//this.setMaximized(true);
	}
		
	private void createContent() {
		//super.mainTable.setDatas(dda.userService.list());
		//super.mainTable.show("mainTable", "");
	}
	

	/** 暂时还是写死的, 以后要改成从数据库或者配置文件取 2020-02-10 21:33:13 **/
	@Override
	protected String title() {
		return "用户";
	}
	
	public static void main(String[] args) {
		new UserShell().go();
	}


	@Override
	protected AbstractShell<? extends AbstractShell<?>> mainAddShell() {
		return new UserEditShell(0, dda.userService);
	}

	@Override
	protected AbstractShell<? extends AbstractShell<?>> mainEditShell(int sID) {
		return new UserEditShell(sID, dda.userService);
	}

	@Override
	protected List<? extends BaseModel<?>> getList() {
		return dda.userService.list();
	}

}
